<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:80:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\second\detail.html";i:1493713058;s:80:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\public\layout.html";i:1493803137;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title><?php echo $seo['title']; ?></title>
    <meta name="Keywords" content="<?php echo $seo['keys']; ?>">
    <meta name="Description" content="<?php echo $seo['desc']; ?>">
    <link rel="stylesheet" href="__CSS__/amazeui.min.css"/>
    <link type="text/css" rel="stylesheet"  href="__CSS__/main.css"/>
    <link rel="stylesheet" href="__CSS__/mobile.css">
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <script>
        var page = 1,flag  = true,params =  {page: page};
    </script>
</head>
<body>

<header data-am-widget="header" class="am-header am-header-default">
    <div class="am-header-left am-header-nav">
        <a href="javascript:history.back();" class="">
            <i class="am-header-icon am-icon-chevron-left"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        <?php if(isset($info)): ?><?php echo $info['title']; else: ?><?php echo $title; endif; ?>
    </h1>
    <div class="am-header-right am-header-nav">
        <a href="<?php echo url('Index/index'); ?>" class="">
            <i class="am-header-icon am-icon-home"></i>
        </a>
    </div>
</header>


<script src="__JS__/amazeui.min.js"></script>
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{"directionNav":false}' >
    <ul class="am-slides">
        <?php if(is_array($info['file']) || $info['file'] instanceof \think\Collection || $info['file'] instanceof \think\Paginator): $i = 0; $__LIST__ = $info['file'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
        <li><img src="<?php echo $vo['url']; ?>" /></li>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>
</div>

<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t"><?php echo $info['title']; ?></span></h1>
    <ul class="data">
        <li class="w5"><label>小区：</label><a href="<?php echo url('Xiaoqu/detail',['id'=>$info['estate_id']]); ?>"><?php echo $info['estate_name']; ?></a></li>
        <li class="w5"><label>总价：</label><?php echo $info['total_price']; ?>万</li>
        <li class="w5"><label>单价：</label><?php echo $info['price']; ?>元/㎡</li>
        <li class="w5"><label>装修：</label><?php echo $zhuangxiu; ?></li>
        <li class="w5"><label>面积：</label><?php echo $info['mianji']; ?>㎡</li>
        <li class="w5"><label>楼层：</label><?php echo $info['floor']; ?>层/共<?php echo $info['total_floor']; ?>层</li>
        <li class="w5"><label>朝向：</label><?php echo $chaoxiang; ?></li>
        <li class="w5"><label>年代：</label><?php echo $info['niandai']; ?>年</li>
        <li><label>户型：</label><?php echo $info['room']; ?>室<?php echo $info['ting']; ?>厅<?php echo $info['wei']; ?>卫<?php echo $info['chu']; ?>厨<?php echo $info['yang']; ?>阳台</li>
        <li><label>地址：</label><?php echo $info['address']; ?></li>
    </ul>
</div>

<div class="div_box03">
    <div class="pageInfo">
        <h1 class="h1_title"><span class="h1_title_t">房源描述</span></h1>
        <div style="padding: 10px;"><?php echo $info['info']; ?></div>
    </div>
</div>
<div class="div_box03">
    <div class="pageInfo">
    <h1 class="h1_title"><span class="h1_title_t">房源图片</span></h1>
    <div class="second_img overflow_h">
        <ul class="pic_box">
            <?php if(is_array($info['file']) || $info['file'] instanceof \think\Collection || $info['file'] instanceof \think\Paginator): $i = 0; $__LIST__ = $info['file'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
            <li><a href="<?php echo $vo['url']; ?>"><img src="<?php echo $vo['url']; ?>" /></a></li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
    </div>
    </div>
</div>

<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">小区简介</span></h1>
    <div class="iocation overflow_h">
        <?php echo $estate; ?>
    </div>
</div>
<div class="div_box03">
    <div class="h_s_n3_t"><h1 class="h1_title"><span class="h1_title_t">预约看房</span></h1></div>
    <div class="pageSignUp">
        <dl>
            <dt>看房热线（24小时服务）<em>全程免费接机安排</em></dt>
            <dd><b><?php echo $info['contact_phone']; ?></b></dd>
        </dl>
        <form action="<?php echo url('Ajax/addOrder'); ?>" method="post" id="form">
        <ul>
            <li class="pageSignUp_ico16"><input type="text" placeholder="您的称呼" required="" class="itext" id="name" name="name"></li>
            <li class="pageSignUp_ico17"><input type="text" placeholder="您的手机号码" required="" class="itext" id="phone" name="phone"></li>
            <p><a href="javascript:;" class="but03" id="baoming_btn">提交预约</a></p>
            <input type="hidden" value="second_house" name="model" id="model">
            <input type="hidden" value="1" name="type" id="type">
            <input type="hidden" value="<?php echo $info['id']; ?>" name="house_id" id="house_id">
        </ul>
        </form>
    </div>
</div>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/plugins/jquery.ajax.form.js"></script>
<link href="__PUBLIC__/js/photoswipe/css/photoswipe.css" rel="stylesheet" />
<script src="__PUBLIC__/js/photoswipe/js/klass.min.js"></script>
<script src="__PUBLIC__/js/photoswipe/js/photoswipe.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var myPhotoSwipe = $(".pic_box a").photoSwipe({
            enableMouseWheel: false,
            enableKeyboard: false,
            captionAndToolbarAutoHideDelay: 0
        });
    });
</script>
<script>
    $(function(){
        $('#baoming_btn').on('click',function(){
            var name = $.trim($('#name').val()),phone = $('#phone').val(),reg = /^1[34578][0-9]{9}$/;
            if(name.length == 0){
                layer.msg('请填写您的姓名',{icon:2});
                return false;
            }
            if(!reg.test(phone)){
                layer.msg('请填写正确的手机号码',{icon:2});
                return false;
            }
            layer.load(1);
            $('#form').submit();
        });
    });

    $('#form').ajaxForm({success:complate,dataType:'json'});
    function complate(result){
        layer.closeAll();
        if(result.status == 1){
            layer.msg(result.msg,{icon:1});
            $('#name').val(' ');
            $('#phone').val(' ');
        } else {
            layer.msg(result.msg,{icon:2});
        }
    }
</script>

<footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{  }">
    <div class="am-footer-switch"><?php $n=0; if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['pos'] == 2): $n++; if(!(empty($vo['alias']) || (($vo['alias'] instanceof \think\Collection || $vo['alias'] instanceof \think\Paginator ) && $vo['alias']->isEmpty()))): $url=url($vo['model'].'/detail',['cate'=>$vo['alias']]); else: $url=url($vo['model'].'/index'); endif; if($n > 1): ?><span class="am-footer-divider"> | </span><?php endif; ?><a class="am-footer-desktop" href="<?php echo $url; ?>"><?php echo $vo['title']; ?></a>
        <?php endif; endforeach; endif; else: echo "" ;endif; ?>

    </div>
    <div class="am-footer-miscs ">

        <p>&copy;<?php echo date('Y'); ?>版权所有 <?php echo $site['title']; ?></p>
        <p>客服电话：<?php echo $site['telphone']; ?></p>
    </div>
    <div class="fang-footer-bar">
        <ul class="am-avg-sm-4">
            <li><a href="<?php echo url('Index/index'); ?>" <?php if($controller == "index"): ?>class="on"<?php endif; ?>><i class="am-icon-home am-icon-sm"></i><p>首页</p></a></li>
            <li><a href="<?php echo url('Loupan/index'); ?>" <?php if($controller == "loupan"): ?>class="on"<?php endif; ?>><i class="am-icon-building am-icon-sm"></i><p>新房</p></a></li>
            <li><a href="<?php echo url('Second/index'); ?>" <?php if($controller == "second"): ?>class="on"<?php endif; ?>><i class="am-icon-institution am-icon-sm"></i><p>二手</p></a></li>
            <li><a href="<?php echo url('user.index/index'); ?>"><i class="am-icon-user am-icon-sm"></i><p>我的</p></a></li>
        </ul>
    </div>
</footer>
<?php echo $site['mobileJs']; if(isset($ajaxdata)): ?>
<div id="loadingToast" class="am-hide">
    <div class="ylj-mask"></div>
    <div class="ylj-toast">
        <i class="ylj-loading weui-icon_toast"></i>
        <p class="ylj-toast__content">数据加载中</p>
    </div>
</div>
<script src="__PUBLIC__/js/layer/laytpl.js"></script>
<script>
    $(function(){
        $(window).scroll(function(){
            if(($(window).scrollTop() + $(window).height() > $(document).height()-10) && flag){
                var totalpage = $("#lists").data('total');
                if(totalpage > 1 && totalpage >= page){
                    $("#loadingToast").removeClass('am-hide');
                    getData();
                }else{
                    $("#loading-alt").removeClass('am-hide');
                    flag = false;
                }
            }
        });
    });
    function getData(){
        var url =  $("#lists").data('uri');
        $.get(url,params,function(data){
            $("#loadingToast").addClass('am-hide');
            if(data.status == 1){
                if(data.data){
                    var gettpl = document.getElementById('template').innerHTML;
                    laytpl(gettpl).render(data.data, function(html){
                        $('#lists').append(html);
                    });
                }else{
                    $('#lists').html('<li>暂无数据</li>');
                }

            }else{
                $("#loading-alt").removeClass('am-hide');
                flag = false;
            }
        });
        page++;
    }
</script>
<?php endif; ?>
</body>
</html>